﻿<UserControl 
  x:Class="ATSV2.MainPage"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
  xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
  xmlns:dataControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit" 
  xmlns:login="clr-namespace:ATSV2.LoginUI"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="1024" d:DesignHeight="760">

    <Grid x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="42" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="658*" />
            <RowDefinition Height="60" />
        </Grid.RowDefinitions>


        <Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}" Grid.Row="0">

            <Border x:Name="BrandingBorder" Style="{StaticResource BrandingBorderStyle}">
                <StackPanel x:Name="BrandingStackPanel" Style="{StaticResource BrandingStackPanelStyle}">

                    <ContentControl Style="{StaticResource LogoIcon}"/>
                    <TextBlock x:Name="ApplicationNameTextBlock" Style="{StaticResource ApplicationNameStyle}" 
                            Text="ATSV Basketball" Width="205" />

                </StackPanel>
            </Border>

            <Border x:Name="LinksBorder" Style="{StaticResource LinksBorderStyle}">
                <StackPanel x:Name="LinksStackPanel" Style="{StaticResource LinksStackPanelStyle}">

                    <HyperlinkButton x:Name="Link1" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Home" TargetName="ContentFrame" Content="Home"/>

                    <Rectangle x:Name="Divider1" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link2" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Teams" TargetName="ContentFrame" Content="Teams"/>

                    <Rectangle x:Name="Divider2" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link3" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Gaestebuch" TargetName="ContentFrame" Content="Gästebuch"/>

                    <Rectangle x:Name="Divider3" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link4" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Galerie" TargetName="ContentFrame" Content="Galerie"/>

                    <Rectangle x:Name="Divider4" Style="{StaticResource DividerStyle}"/>


                    <HyperlinkButton x:Name="Link5" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Links" TargetName="ContentFrame" Content="Links"/>

                    <Rectangle x:Name="Divider5" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link6" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Sponsoring" TargetName="ContentFrame" Content="Sponsoring"/>

                    <Rectangle x:Name="Divider6" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link7" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Hallen" TargetName="ContentFrame" Content="Hallen"/>

                    <Rectangle x:Name="Divider7" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link8" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Anmeldung" TargetName="ContentFrame" Content="Anmeldung"/>

                    <Rectangle x:Name="Divider8" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link9" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Kontakt" TargetName="ContentFrame" Content="Kontakt"/>

                    <Rectangle x:Name="Divider9" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link10" Style="{StaticResource LinkStyle}" 
                                    NavigateUri="/Impresum" TargetName="ContentFrame" Content="Impresum"/>


                </StackPanel>
            </Border>


        </Grid>

        <Border Style="{StaticResource LoginContainerStyle}" Grid.Row="1" Margin="0,0,15,0" >
            <login:LoginStatus/>
        </Border>
        
        <Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}" Grid.Row="2">
            <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" 
                        Source="/Home" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed" Background="Black">
                <navigation:Frame.UriMapper>
                    <uriMapper:UriMapper>
                        <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
                        <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
                    </uriMapper:UriMapper>
                </navigation:Frame.UriMapper>
            </navigation:Frame>


        </Border>


        <Grid x:Name="FooterGrid" Style="{StaticResource FooterGridStyle}" Grid.Row="3">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="829*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <StackPanel x:Name="FooterStackPanel" Style="{StaticResource FooterStackPanelStyle}">

                <TextBlock x:Name="SponsorNameTextBlock" Style="{StaticResource SponsorNameStyle}" Text="Sponsor:" Width="96" Grid.Column="0" />
                <ContentControl Style="{StaticResource SponsorLogoIcon}" Width="86" />
            </StackPanel>
            <TextBlock x:Name="Copyright" Text="Copyright © ATSV Basketball 2012" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,20,10,0" Grid.Column="1" />
        </Grid>


    </Grid>


</UserControl>